#include "ClientSocket.h"
#include "SocketException.h"
#include <iostream>
#include <string>


int main ( int argc, char* argv[] ){

bool boucle=true;
int choix, res;
string login="Inconnu (pas encore logué)", mdp;


cout << "  .-.     .-.     .-.            .-.     .-.     .-. \n";
cout << ".'   `._.'   `._.'   `. CLIENT .'   `._.'   `._.'   `._ \n\n";

ClientSocket client_socket ("localhost", 30003);

try{
		
   	
while(true){   	
   	
 	cout << "String : ";
  	//cin >> login;
  	getline(cin,login);
	cout << "Message : " << login <<endl;	
   	client_socket << login;
   	client_socket >> login;
   	client_socket << "DINDON";
   	
/*   	
   	cout << "Nombre : " ;
 	cin >> choix ;
	client_socket << choix;
	client_socket >> login;
	client_socket << 7;
/*
	client_socket << 2;
	client_socket << 8;
	*/
	//cout << login <<endl;
	//client_socket >> reply;

	
	//client_socket >> reply;
	//cout << reply <<endl;
}	
	
}
catch ( SocketException& e ){
	cout << "Exception was caught:" << e.description() << "\n";
}

}
